<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>上传快递单号</title>
    <meta name="keywords" content="知果汇"/>
    <meta name="description" content="知果汇"/>
    <link rel="SHORTCUT ICON" href="images/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="_CSS_/reset.css">
    <link rel="stylesheet" type="text/css" href="_CSS_/common.css">
    <link rel="stylesheet" type="text/css" href="_CSS_/store_center.css"/>
    <style type="text/css">
        html, body {
            width: 570px;
            min-width: 570px;
        }

        .upload-box {
            padding: 20px;
            float: left;
        }

        .upload-title {
            color: #333333;
            font-size: 17px;
        }

        .upload-title input {
            border: 1px solid #f2f2f2;
            height: 38px;
            width: 398px;
            font-size: 17px;
            text-indent: 5px;
            margin-left: 5px;
        }

        .btn-box {
            width: 570px;
            text-align: center;
            margin-top: 20px;
        }

        .btn-box a {
            display: inline-block;
            height: 37px;
            line-height: 37px;
            margin: 5px 25px 0;
            padding: 0 30px;
            border: 1px solid #dedede;
            background-color: #fff;
            color: #333;
            border-radius: 5px;
            font-weight: 400;
            cursor: pointer;
            text-decoration: none;
            font-size: 14px;
        }

        .btn-box .btn-n1 {
            border-color: #3377c0;
            background-color: #3377c0;
            color: #ffffff;
        }
    </style>
</head>
<body>
<form action="" method="post">
    <div class="upload-box">
        <label class="upload-title">快递单号:<input type="text" id="seller_e" name="" placeholder="请输入快递单号"></label>

        <div class="btn-box">
            <a class="btn-n1" href="#" title="确认" onclick="confirm()">确认</a>
            <a class="btn-n2" href="#" title="取消" onclick="cancel()">取消</a>
        </div>
    </div>
</form>
</body>
<script src="_JS_/jquery-1.8.3.min.js"></script>
<script src="_JS_/jquery.base64.js"></script>
<script src="_JS_/jquery.cookie.js"></script>
<script src="_JS_/common.js"></script>
<script src="_P_/layer/layer.js"></script>
<script type="text/javascript">
    var url = window.location.href;
    var id = url.split("#")[1];
    var king = url.split("#")[2];
    var all = url.split("#")[3];
    if (king == '') {
        king = 1;
    }

    if (all == '') {
        all = 0;
    }

    //确认
    function confirm(obj) {
        var seller_e = $("#seller_e").val();
        //上传
        $.ajax({
            type: "get",
            url: "/index.php/api/shop/update_caking",
            data: {id: id, 'seller_e': seller_e},
            dataType: 'jsonp',
            jsonp: 'callback',
			beforeSend: function () {
                var index = layer.load(1, {
                    shade: [0.1, '#333333'] //0.1透明度的白色背景
                });
			},
            success: function (msg) {
                layer.closeAll();
                if (msg.code == 200) {
                    parent.postfile(1, king, all);
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                }else if (msg.code == 1002) {
					layer.msg(msg.message, {icon: 5});
					parent.order_service(1);
					var desk = parent.layer.getFrameIndex(window.name);
					parent.layer.close(desk);
				}else{
					layer.msg(msg.message, {icon: 5});
				}
            }
        });
    }

    //取消
    function cancel(obj) {
		var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }
</script>
</html>
